package org.campuscontent.ui;

import java.awt.BorderLayout;
import java.awt.Dimension;

import org.campuscontent.config.Config;
import org.campuscontent.main.MainFrame;
import org.campuscontent.ui.multipanel.PopupMenuConnector;
import org.campuscontent.ui.multipanel.UsersPanelContainer;

public class Template17 extends TemplateBase
{
	public static int paraID = 17;
	
	public Template17( MainFrame mf )
	{
	    super( mf );
	    
	    container = new UsersPanelContainer( this );
	    container.setMinimumSize( new Dimension( 100, 60 ) );
        
        PopupMenuConnector connector = PopupMenuConnector.getInstance();
        connector.setControl( container );
        
	    left.setLayout( new BorderLayout() );
	    left.add( container );
	    
	    initView();
	}

	public void initView()
	{
		mf.rootPanel.setDividerLocation(Config.POSITION_TO_SHOW_TEMPLATE_WITH_PICTURE);
		mf.rootPanel.setDividerSize( 6 ); 
		mf.rootPanel.setResizeWeight( 0.2 ); 
		setResizeWeight( 0.2 ); 

		this.setDividerLocation(Config.POSITION_TO_HIDE_PROBLEM_CONTROLS);
	}

	public String getAnswer()
	{
		return "";
	}
	
	public boolean setPreview()
	{
		if (!super.setPreview()) return false;
		this.setDividerLocation(Config.POSITION_TO_SHOW_PROBLEM_CONTROLS);
		mf.rootPanel.setDividerLocation(Config.POSITION_TO_SHOW_TEMPLATE_WITH_PICTURE);
		mf.problemCtrl.exitPreview.setBounds(2, 300, 135, 30);
		return true;
	}

	public boolean exitPreview()
	{
		super.exitPreview();
		mf.problemCtrl.exitPreview.setBounds(2, 430, 135, 30);
		
		return true;
	}

	public String checkAns()
	{
		return "";
	}

	public void showSolution()
	{
		super.showSolution();
	}
	
	public boolean updateToLObjectNew()
	{
		super.updateToLObjectNew();
		return true;
	}
	
	public int getId()
	{
		return paraID;
	}
	
	protected UsersPanelContainer container;
}
